import Vue from 'vue';
import { changeStr } from '@/utils/comm';
const requireComponent=require.context('.',true,/\.vue$/);
requireComponent.keys().forEach(filname=>{
    const config=requireComponent(filname);
    const componentsName=changeStr(filname
        .replace(/^\.\//,'')
        .replace(/^\w+\//,'')
        .replace(/^\w+\//,'')
        .replace(/\.\w+$/,'')
    )
    Vue.component(componentsName,config.default||config);
})